-module(test_aleph_process_labeler).
-include_lib("eunit/include/eunit.hrl").
-include("aleph_naming_macros.hrl"). 
-include("aleph_service_macros.hrl").
-export([label_process_test/0,label_process_test/1,
         process_spec/0,start_link/0,init/1,handle_call/3]).
-import(aleph_process_labeler,[label_process/1,label_application/1,unlabel_application/0]).

-define(TEST_PROCESS,?name(test_process)).
%%%%%%%%%%%%%static functions
process_spec()->
     {?TEST_PROCESS,{test_aleph_process_labeler,start_link,[]},transient, brutal_kill,worker, [test_aleph_process_labeler]}.
%%%%%%%%%%%%%behaviour implementations
start_link() ->    
   label_process(
                  gen_server:start_link({local,?TEST_PROCESS},test_aleph_process_labeler, [], [])).
init([])->
    {ok,ok}.
-define(SERVICE_NAME,?TEST_PROCESS).
?gen_handle_call.
?define_call(label_process_test).
label_process_test(State)->
    try     
       ?match(true,self()==whereis(?TEST_PROCESS)),
       ?match(true,whereis(test_app_test_process)==whereis(?TEST_PROCESS)),
       {reply,ok,State}      
    catch
      exit->{reply,error,State}
    end.
  
 

